package com.gitee.ywj1352.reactive;

import org.reactivestreams.Publisher;
import org.reactivestreams.Subscriber;

public class SimplePublisher implements Publisher<Integer> {

    private Subscriber sb;

    @Override
    public void subscribe(Subscriber<? super Integer> s) {
        System.out.println("SimplePublisher#subscribe :" + s.getClass());
        SampleSubscription subscription = new SampleSubscription(new DecoratingSubscriber(s));
        s.onSubscribe(subscription);
        sb = s;
    }

}
